<template>
  <div>
    <a-card>
      <div class="text-xl font-bold mb-4">工位管理</div>
      <vxe-grid ref="xGrid" v-bind="gridOptions" v-on="gridEvent">
        <template #parking="{row}">
        {{row.parking.parking_type}}{{row.parking.no}}
        </template>

      
        <template #action="{row}">
          <vxe-button
            status="primary"
            content="操作"
            @click="editRow(row)"
          ></vxe-button>
        </template>
      </vxe-grid>
    </a-card>
  </div>
</template>

<script setup lang="ts">
const { gridOptions } = useParkingStateHistory();
const xGrid = ref();
const gridEvent: VxeGridListeners<RowVO> = {
  proxyQuery() {
    console.log("数据代理查询事件");
    const grid = xGrid.value;
    // 获取表格中的数据
    // const data = grid.getTableData().fullData;
    // console.log(data);
  },
  proxyDelete() {
    console.log("数据代理删除事件");
  },
  proxySave() {
    console.log("数据代理保存事件");
  },
};
</script>

<style></style>
